import Vue from 'vue'
import store from './store'
import App from './App.vue'
import router from './router'
import './routeendpoint' // route endpoint for redirect control
import "font-awesome/css/font-awesome.min.css"
Vue.config.productionTip = false;

import './core/lazy_use'
// 引用API文件
import httpapi from "@/utils/httpapi"
// 将API方法绑定到全局
Vue.prototype.$httpapi = httpapi;
// 注入全局过滤器
import * as filter from '@/utils/globalfilter'
Object.keys(filter).forEach(key => {
  Vue.filter(key, filter[key])
})
import hljs from 'highlight.js';
Vue.directive('hljs', el => {
  let blocks = el.querySelectorAll('pre code');
  Array.prototype.forEach.call(blocks, hljs.highlightBlock);
});
new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
